import { Address, Boolean, Code, CreateDate, DateTime, Int, PrimaryUuid, Star, Telephone, Title, UpdateDate } from "../utils";
import { Entity, Index } from "typeorm";

@Entity({
    name: 'fj_hotel'
})
export class FjHotelEntity {
    @PrimaryUuid()
    id: string;

    @Code()
    @Index()
    from: string;

    @Int()
    hotelid: number;

    @Title()
    name: string;

    @Title()
    name_cn: string;

    @Address({
        nullable: true
    })
    address: string;

    @Address({ nullable: true })
    address_cn: string;

    @Code({
        nullable: true
    })
    citycode: string;

    @Title({
        nullable: true
    })
    cityname: string;

    @Title({
        nullable: true
    })
    cityname_cn: string;

    @Code({ nullable: true })
    countrycode: string;

    @Title({ nullable: true })
    countryname: string;

    @Title({
        nullable: true
    })
    countryname_cn: string;

    @Star({ default: 0 })
    starrating: number;

    @Telephone({
        nullable: true
    })
    telephone: string;

    @Code({
        nullable: true
    })
    destinationid: string;

    @Title({ default: '' })
    destinationname: string;

    @Title({ default: '' })
    destinationname_cn: string;

    @Code({ nullable: true })
    longitude: string;

    @Code({ nullable: true })
    latitude: string;

    @Code({ nullable: true })
    zipcode: string;
    // no
    @Code({
        nullable: true
    })
    statecode: string;

    @Boolean({ default: true })
    status: boolean;

    @Code({ nullable: true })
    airportcode: string;

    @Int(11, { nullable: true })
    propertycategory: number;

    @DateTime()
    updatedate: Date;

    @Code({ nullable: true })
    hash: string;

    @CreateDate()
    create_date: Date;

    @UpdateDate()
    update_date: Date;
}